package thread;

public class PriorityDemo {
    public static void main(String[] args) {
        Thread min = new Thread(() -> {
            for (int i = 0; i < 100; i++) {
                System.out.println("min");
            }
        });
        Thread max = new Thread(() -> {
            for (int i = 0; i < 100; i++) {
                System.out.println("max");
            }
        });
        min.setPriority(Thread.MIN_PRIORITY);
        max.setPriority(Thread.MAX_PRIORITY);
        min.start();
        new Thread(() -> {
            for (int i = 0; i < 100; i++) {
                System.out.println("nor");
            }
        }).start();
        max.start();
    }
}
